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>
15 function smoothly_init(App $a) {
16 set_template_engine($a, 'smarty3');
20 $baseurl = App::get_baseurl($ssl_state);
21 $a->page['htmlhead'] .= <<< EOT
24 function insertFormatting(BBcode, id) {
25 var tmpStr = $("#comment-edit-text-" + id).val();
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);
32 textarea = document.getElementById("comment-edit-text-" +id);
33 if (document.selection) {
35 selected = document.selection.createRange();
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 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
46 function cmtBbOpen(id) {
47 $(".comment-edit-bb-" + id).show();
49 function cmtBbClose(comment, id) {
50 $(".comment-edit-bb-" + id).hide();
52 $(document).ready(function() {
54 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
56 $('.group-edit-icon').hover(
58 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
60 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
63 $('.sidebar-group-element').hover(
65 id = $(this).attr('id');
66 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
69 id = $(this).attr('id');
70 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
74 $('.savedsearchdrop').hover(
76 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
78 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
81 $('.savedsearchterm').hover(
83 id = $(this).attr('id');
84 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
87 id = $(this).attr('id');
88 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
97 if (!is_null($cssFile)) {
98 $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
104 if (! function_exists('_js_in_foot')) {
105 function _js_in_foot() {
106 /** @purpose insert stuff in bottom of page
110 $baseurl = App::get_baseurl($ssl_state);
111 $bottom['$baseurl'] = $baseurl;
112 $tpl = get_markup_template('bottom.tpl');
114 return $a->page['bottom'] = replace_macros($tpl, $bottom);