5 * Description: Like coffee with milk. Theme works fine with iPad[2].
6 * Version: Version 0.11.14-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>
13 $a->theme_info = array();
15 function smoothly_init(&$a) {
18 $baseurl = $a->get_baseurl($ssl_state);
19 $a->page['htmlhead'] .= <<< EOT
22 function insertFormatting(comment,BBcode,id) {
24 var tmpStr = $("#comment-edit-text-" + id).val();
25 if(tmpStr == comment) {
27 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
28 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
29 openMenu("comment-edit-submit-wrapper-" + id);
30 $("#comment-edit-text-" + id).val(tmpStr);
33 textarea = document.getElementById("comment-edit-text-" +id);
34 if (document.selection) {
36 selected = document.selection.createRange();
38 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
40 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
41 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
42 var start = textarea.selectionStart;
43 var end = textarea.selectionEnd;
45 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
47 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
52 function cmtBbOpen(id) {
53 $(".comment-edit-bb-" + id).show();
55 function cmtBbClose(comment, id) {
56 $(".comment-edit-bb-" + id).hide();
58 $(document).ready(function() {
60 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
62 $('.group-edit-icon').hover(
64 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
66 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
69 $('.sidebar-group-element').hover(
71 id = $(this).attr('id');
72 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
75 id = $(this).attr('id');
76 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
80 $('.savedsearchdrop').hover(
82 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
84 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
87 $('.savedsearchterm').hover(
89 id = $(this).attr('id');
90 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
93 id = $(this).attr('id');
94 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
103 if (!is_null($cssFile)) {
104 $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
111 if(! function_exists('_js_in_foot')) {
112 function _js_in_foot() {
113 /** @purpose insert stuff in bottom of page
117 $baseurl = $a->get_baseurl($ssl_state);
118 $bottom['$baseurl'] = $baseurl;
119 $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
121 return $a->page['bottom'] = replace_macros($tpl, $bottom);