5 * Description: Like coffee with milk. Theme works fine with iPad[2].
7 * Author: Alex <https://friendica.pixelbits.de/profile/alex>
8 * Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
9 * Screenshot: <a href="screenshot.png">Screenshot</a>
12 $a->theme_info = array();
14 function smoothly_init(&$a) {
15 $a->page['htmlhead'] .= <<< EOT
18 function insertFormatting(comment,BBcode,id) {
20 var tmpStr = $("#comment-edit-text-" + id).val();
21 if(tmpStr == comment) {
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);
29 textarea = document.getElementById("comment-edit-text-" +id);
30 if (document.selection) {
32 selected = document.selection.createRange();
34 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
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;
41 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
43 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
48 function cmtBbOpen(id) {
49 $(".comment-edit-bb-" + id).show();
51 function cmtBbClose(comment, id) {
52 $(".comment-edit-bb-" + id).hide();
54 $(document).ready(function() {
56 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
58 $('.group-edit-icon').hover(
60 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
62 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
65 $('.sidebar-group-element').hover(
67 id = $(this).attr('id');
68 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
71 id = $(this).attr('id');
72 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
76 $('.savedsearchdrop').hover(
78 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
80 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
83 $('.savedsearchterm').hover(
85 id = $(this).attr('id');
86 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
89 id = $(this).attr('id');
90 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
99 if (!is_null($cssFile)) {
100 $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
107 if(! function_exists('_js_in_foot')) {
108 function _js_in_foot() {
109 /** @purpose insert stuff in bottom of page
112 $baseurl = $a->get_baseurl($ssl_state);
113 $bottom['$baseurl'] = $baseurl;
114 $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
116 return $a->page['bottom'] = replace_macros($tpl, $bottom);