]> git.mxchange.org Git - friendica.git/blob - view/theme/vier/theme.php
Some more system settings are now reachable via front-end
[friendica.git] / view / theme / vier / theme.php
1 <?php
2 /**
3  * Name: Vier
4  * Version: 0.9
5  * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
6  * Author: Ike <http://pirati.ca/profile/heluecht>
7  * Maintainer: Ike <http://pirati.ca/profile/heluecht>
8  * Description: "Vier" uses the font awesome font library: http://fortawesome.github.com/Font-Awesome/
9  */
10
11 $a->theme_info = array();
12
13 function vier_init(&$a) {
14 $a->page['htmlhead'] .= <<< EOT
15 <script>
16 function insertFormatting(comment,BBcode,id) {
17
18                 var tmpStr = $("#comment-edit-text-" + id).val();
19                 if(tmpStr == comment) {
20                         tmpStr = "";
21                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
22                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
23                         openMenu("comment-edit-submit-wrapper-" + id);
24                         $("#comment-edit-text-" + id).val(tmpStr);
25                 }
26
27         textarea = document.getElementById("comment-edit-text-" +id);
28         if (document.selection) {
29                 textarea.focus();
30                 selected = document.selection.createRange();
31                 if (BBcode == "url"){
32                         selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
33                         } else                  
34                 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
35         } else if (textarea.selectionStart || textarea.selectionStart == "0") {
36                 var start = textarea.selectionStart;
37                 var end = textarea.selectionEnd;
38                 if (BBcode == "url"){
39                         textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
40                         } else
41                 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
42         }
43         return true;
44 }
45
46
47 function showThread(id) {
48         $("#collapsed-comments-" + id).show()
49         $("#collapsed-comments-" + id + " .collapsed-comments").show()
50 }
51 function hideThread(id) {
52         $("#collapsed-comments-" + id).hide()
53         $("#collapsed-comments-" + id + " .collapsed-comments").hide()
54 }
55
56
57 function cmtBbOpen(id) {
58         $("#comment-edit-bb-" + id).show();
59 }
60 function cmtBbClose(id) {
61         $("#comment-edit-bb-" + id).hide();
62 }
63
64 /*
65 $(document).ready(function() {
66
67 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
68
69 $('.group-edit-icon').hover(
70         function() {
71                 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
72         function() {
73                 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
74         );
75
76 $('.sidebar-group-element').hover(
77         function() {
78                 id = $(this).attr('id');
79                 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
80
81         function() {
82                 id = $(this).attr('id');
83                 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
84         );
85
86
87 $('.savedsearchdrop').hover(
88         function() {
89                 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
90         function() {
91                 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
92         );
93
94 $('.savedsearchterm').hover(
95         function() {
96                 id = $(this).attr('id');
97                 $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
98
99         function() {
100                 id = $(this).attr('id');
101                 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
102         );
103
104 });
105
106 */
107 </script>
108 EOT;
109 }