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 if (BBcode == "url") {
37 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
39 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
41 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
42 var start = textarea.selectionStart;
43 var end = textarea.selectionEnd;
44 if (BBcode == "url") {
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);
54 function cmtBbOpen(id) {
55 $(".comment-edit-bb-" + id).show();
57 function cmtBbClose(comment, id) {
58 $(".comment-edit-bb-" + id).hide();
60 $(document).ready(function() {
62 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
64 $('.group-edit-icon').hover(
66 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
68 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
71 $('.sidebar-group-element').hover(
73 id = $(this).attr('id');
74 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
77 id = $(this).attr('id');
78 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
82 $('.savedsearchdrop').hover(
84 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
86 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
89 $('.savedsearchterm').hover(
91 id = $(this).attr('id');
92 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
95 id = $(this).attr('id');
96 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
105 if (!is_null($cssFile)) {
106 $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
112 if (! function_exists('_js_in_foot')) {
113 function _js_in_foot() {
114 /** @purpose insert stuff in bottom of page
118 $baseurl = App::get_baseurl($ssl_state);
119 $bottom['$baseurl'] = $baseurl;
120 $tpl = get_markup_template('bottom.tpl');
122 return $a->page['bottom'] = replace_macros($tpl, $bottom);