5 * Description: Like coffee with milk. Theme optimized for iPad[2].
6 * Version: Version 2013-04-24
8 * Author: Devlon Duthied
9 * Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
10 * Screenshot: <a href="screenshot.png">Screenshot</a>
13 function smoothly_init(&$a) {
14 $a->theme_info = array();
15 set_template_engine($a, 'smarty3');
19 $baseurl = $a->get_baseurl($ssl_state);
20 $a->page['htmlhead'] .= <<< EOT
23 function insertFormatting(comment,BBcode,id) {
25 var tmpStr = $("#comment-edit-text-" + id).val();
26 if(tmpStr == comment) {
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);
31 $("#comment-edit-text-" + id).val(tmpStr);
34 textarea = document.getElementById("comment-edit-text-" +id);
35 if (document.selection) {
37 selected = document.selection.createRange();
39 selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
41 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
42 } else if (textarea.selectionStart || textarea.selectionStart == "0") {
43 var start = textarea.selectionStart;
44 var end = textarea.selectionEnd;
46 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
48 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
53 function cmtBbOpen(id) {
54 $(".comment-edit-bb-" + id).show();
56 function cmtBbClose(comment, id) {
57 $(".comment-edit-bb-" + id).hide();
59 $(document).ready(function() {
61 $('html').click(function() { $("#nav-notifications-menu" ).hide(); });
63 $('.group-edit-icon').hover(
65 $(this).addClass('icon'); $(this).removeClass('iconspacer');},
67 $(this).removeClass('icon'); $(this).addClass('iconspacer');}
70 $('.sidebar-group-element').hover(
72 id = $(this).attr('id');
73 $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
76 id = $(this).attr('id');
77 $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
81 $('.savedsearchdrop').hover(
83 $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
85 $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
88 $('.savedsearchterm').hover(
90 id = $(this).attr('id');
91 $('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
94 id = $(this).attr('id');
95 $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
104 if (!is_null($cssFile)) {
105 $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 = $a->get_baseurl($ssl_state);
119 $bottom['$baseurl'] = $baseurl;
120 $tpl = get_markup_template('bottom.tpl');
122 return $a->page['bottom'] = replace_macros($tpl, $bottom);