5 * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
6 * Maintainer: Fabio <http://kirgroup.com/profile/fabrixxm>
7 * Maintainer: Tobias <https://diekershoff.homeunix.net/friendika/profile/tobias>
10 $a->theme_info = array();
12 function quattro_init(&$a) {
13 $a->page['htmlhead'] .= <<< EOT
15 function insertFormatting(comment,BBcode,id) {
17 var tmpStr = $("#comment-edit-text-" + id).val();
18 if(tmpStr == comment) {
20 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
21 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
22 openMenu("comment-edit-submit-wrapper-" + id);
23 $("#comment-edit-text-" + id).val(tmpStr);
26 textarea = document.getElementById("comment-edit-text-" +id);
27 if (document.selection) {
29 selected = document.selection.createRange();
31 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
33 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
34 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
35 var start = textarea.selectionStart;
36 var end = textarea.selectionEnd;
38 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
40 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
45 function cmtBbOpen(id) {
46 $(".comment-edit-bb-" + id).show();
48 function cmtBbClose(comment, id) {
49 $(".comment-edit-bb-" + id).hide();
51 $(document).ready(function() {
53 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
55 $('.group-edit-icon').hover(
57 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
59 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
62 $('.sidebar-group-element').hover(
64 id = $(this).attr('id');
65 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
68 id = $(this).attr('id');
69 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
73 $('.savedsearchdrop').hover(
75 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
77 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
80 $('.savedsearchterm').hover(
82 id = $(this).attr('id');
83 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
86 id = $(this).attr('id');
87 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}