2 $a->theme_info = array(
3 'extends' => 'duepuntozero',
6 function slackr_init(&$a) {
7 $a->page['htmlhead'] .= <<< EOT
9 function insertFormatting(comment,BBcode,id) {
11 var tmpStr = $("#comment-edit-text-" + id).val();
12 if(tmpStr == comment) {
14 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
15 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
16 openMenu("comment-edit-submit-wrapper-" + id);
19 textarea = document.getElementById("comment-edit-text-" +id);
20 if (document.selection) {
22 selected = document.selection.createRange();
24 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
26 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
27 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
28 var start = textarea.selectionStart;
29 var end = textarea.selectionEnd;
31 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
33 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
38 function cmtBbOpen(id) {
39 $(".comment-edit-bb-" + id).show();
41 function cmtBbClose(id) {
42 $(".comment-edit-bb-" + id).hide();
44 $(document).ready(function() {
46 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
48 $('.group-edit-icon').hover(
50 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
52 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
55 $('.sidebar-group-element').hover(
57 id = $(this).attr('id');
58 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
61 id = $(this).attr('id');
62 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
66 $('.savedsearchdrop').hover(
68 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
70 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
73 $('.savedsearchterm').hover(
75 id = $(this).attr('id');
76 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
79 id = $(this).attr('id');
80 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}