5 * Description: Theme based on Testbubble and optimized for Tablets.
6 * Version: Version 2013-05-08
7 * Author: Anne Walk, Devlon Duthied
8 * Author: Alex <https://red.pixelbits.de/channel/alex>
9 * Maintainer: Nomen Nominandum
10 * Screenshot: <a href="screenshot.png">Screenshot</a>
14 use Friendica\Core\System;
16 function smoothly_init(App $a) {
17 $a->set_template_engine('smarty3');
21 $baseurl = System::baseUrl($ssl_state);
22 $a->page['htmlhead'] .= <<< EOT
25 function insertFormatting(BBcode, id) {
26 var tmpStr = $("#comment-edit-text-" + id).val();
28 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
29 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
30 openMenu("comment-edit-submit-wrapper-" + id);
33 textarea = document.getElementById("comment-edit-text-" +id);
34 if (document.selection) {
36 selected = document.selection.createRange();
37 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
38 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
39 var start = textarea.selectionStart;
40 var end = textarea.selectionEnd;
41 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
47 function cmtBbOpen(id) {
48 $(".comment-edit-bb-" + id).show();
50 function cmtBbClose(comment, id) {
51 $(".comment-edit-bb-" + id).hide();
53 $(document).ready(function() {
55 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
57 $('.group-edit-icon').hover(
59 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
61 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
64 $('.sidebar-group-element').hover(
66 id = $(this).attr('id');
67 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
70 id = $(this).attr('id');
71 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
75 $('.savedsearchdrop').hover(
77 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
79 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
82 $('.savedsearchterm').hover(
84 id = $(this).attr('id');
85 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
88 id = $(this).attr('id');
89 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
98 if (!is_null($cssFile)) {
99 $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
105 if (! function_exists('_js_in_foot')) {
106 function _js_in_foot() {
107 /** @purpose insert stuff in bottom of page
111 $baseurl = System::baseUrl($ssl_state);
112 $bottom['$baseurl'] = $baseurl;
113 $tpl = get_markup_template('bottom.tpl');
115 return $a->page['bottom'] = replace_macros($tpl, $bottom);