]> git.mxchange.org Git - friendica.git/blob - view/theme/vier/theme.php
Merge https://github.com/annando/friendica into annando
[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['template_engine'] = 'smarty3';
12
13 $a->theme_info = array();
14
15 function vier_init(&$a) {
16 $a->page['htmlhead'] .= <<< EOT
17 <script>
18 function insertFormatting(comment,BBcode,id) {
19
20                 var tmpStr = $("#comment-edit-text-" + id).val();
21                 if(tmpStr == comment) {
22                         tmpStr = "";
23                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
24                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
25                         openMenu("comment-edit-submit-wrapper-" + id);
26                         $("#comment-edit-text-" + id).val(tmpStr);
27                 }
28
29         textarea = document.getElementById("comment-edit-text-" +id);
30         if (document.selection) {
31                 textarea.focus();
32                 selected = document.selection.createRange();
33                 if (BBcode == "url"){
34                         selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
35                         } else                  
36                 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
37         } else if (textarea.selectionStart || textarea.selectionStart == "0") {
38                 var start = textarea.selectionStart;
39                 var end = textarea.selectionEnd;
40                 if (BBcode == "url"){
41                         textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
42                         } else
43                 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
44         }
45         return true;
46 }
47
48
49 function showThread(id) {
50         $("#collapsed-comments-" + id).show()
51         $("#collapsed-comments-" + id + " .collapsed-comments").show()
52 }
53 function hideThread(id) {
54         $("#collapsed-comments-" + id).hide()
55         $("#collapsed-comments-" + id + " .collapsed-comments").hide()
56 }
57
58
59 function cmtBbOpen(id) {
60         $("#comment-edit-bb-" + id).show();
61 }
62 function cmtBbClose(id) {
63         $("#comment-edit-bb-" + id).hide();
64 }
65
66 /*
67 $(document).ready(function() {
68
69 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
70
71 $('.group-edit-icon').hover(
72         function() {
73                 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
74         function() {
75                 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
76         );
77
78 $('.sidebar-group-element').hover(
79         function() {
80                 id = $(this).attr('id');
81                 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
82
83         function() {
84                 id = $(this).attr('id');
85                 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
86         );
87
88
89 $('.savedsearchdrop').hover(
90         function() {
91                 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
92         function() {
93                 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
94         );
95
96 $('.savedsearchterm').hover(
97         function() {
98                 id = $(this).attr('id');
99                 $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
100
101         function() {
102                 id = $(this).attr('id');
103                 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
104         );
105
106 });
107
108 */
109 </script>
110 EOT;
111 }
112