2 $a->theme_info = array(
3 'extends' => 'duepuntozero',
5 $a->theme['template_engine'] = 'smarty3';
7 function slackr_init(&$a) {
8 $a->page['htmlhead'] .= <<< EOT
10 function insertFormatting(comment,BBcode,id) {
12 var tmpStr = $("#comment-edit-text-" + id).val();
13 if(tmpStr == comment) {
15 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
16 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
17 openMenu("comment-edit-submit-wrapper-" + id);
18 $("#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(comment, id) {
42 if($(comment).hasClass('comment-edit-text-full')) {
43 $(".comment-edit-bb-" + id).show();
48 function cmtBbClose(comment, id) {
49 // if($(comment).hasClass('comment-edit-text-empty')) {
50 // $(".comment-edit-bb-" + id).hide();
62 $(document).ready(function() {
64 $("#profile-jot-text").focus(hidecal);
65 $("#profile-jot-text").click(hidecal);
67 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
69 $('.group-edit-icon').hover(
71 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
73 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
76 $('.sidebar-group-element').hover(
78 id = $(this).attr('id');
79 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
82 id = $(this).attr('id');
83 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
87 $('.savedsearchdrop').hover(
89 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
91 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
94 $('.savedsearchterm').hover(
96 id = $(this).attr('id');
97 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
100 id = $(this).attr('id');
101 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}