]> git.mxchange.org Git - friendica.git/blob - view/theme/diabook/smarty3/bottom.tpl
add warning message about automatically generated templates
[friendica.git] / view / theme / diabook / smarty3 / bottom.tpl
1 {{*
2  *      AUTOMATICALLY GENERATED TEMPLATE
3  *      DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
4  *
5  *}}<script type="text/javascript" src="{{$baseurl}}/view/theme/diabook/js/jquery.autogrow.textarea.js"></script>
6 <script type="text/javascript">
7
8 $(document).ready(function() {
9     $("iframe").each(function(){
10         var ifr_source = $(this).attr("src");
11         var wmode = "wmode=transparent";
12         if(ifr_source.indexOf("?") != -1) {
13             var getQString = ifr_source.split("?");
14             var oldString = getQString[1];
15             var newString = getQString[0];
16             $(this).attr("src",newString+"?"+wmode+"&"+oldString);
17         }
18         else $(this).attr("src",ifr_source+"?"+wmode);
19        
20     });
21     
22     $("div#pause").attr("style", "position: fixed;bottom: 43px;left: 5px;");
23     $("div#pause").html("<img src='images/pause.gif' alt='pause' title='pause live-updates (ctrl+space)' style='border: 1px solid black;opacity: 0.2;'>");
24     $(document).keydown(function(event) {
25     if (!$("div#pause").html()){
26     $("div#pause").html("<img src='images/pause.gif' alt='pause' title='pause live-updates (ctrl+space)' style='border: 1px solid black;opacity: 0.2;'>");
27                 }});  
28     $(".autocomplete").attr("style", "width: 350px;color: black;border: 1px solid #D2D2D2;background: white;cursor: pointer;text-align: left;max-height: 350px;overflow: auto;");
29          
30         });
31         
32         $(document).ready(function(){
33                 $("#sortable_boxes").sortable({
34                         update: function(event, ui) {
35                                 var BoxOrder = $(this).sortable("toArray").toString();
36                                 $.cookie("Boxorder", BoxOrder , { expires: 365, path: "/" });
37                         }
38                 });
39
40         var cookie = $.cookie("Boxorder");              
41         if (!cookie) return;
42         var SavedID = cookie.split(",");
43            for (var Sitem=0, m = SavedID.length; Sitem < m; Sitem++) {
44            $("#sortable_boxes").append($("#sortable_boxes").children("#" + SavedID[Sitem]));
45                }
46              
47         });
48         
49         
50         function tautogrow(id){
51                 $("textarea#comment-edit-text-" +id).autogrow();        
52         };
53         
54         function open_boxsettings() {
55                 $("div#boxsettings").attr("style","display: block;height:500px;width:300px;");
56                 $("label").attr("style","width: 150px;");
57                 };
58         
59         function yt_iframe() {
60         $("iframe").load(function() { 
61         var ifr_src = $(this).contents().find("body iframe").attr("src");
62         $("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");
63     });
64
65         };
66
67         function scrolldown(){
68                         $("html, body").animate({scrollTop:$(document).height()}, "slow");
69                         return false;
70                 };
71                 
72         function scrolltop(){
73                         $("html, body").animate({scrollTop:0}, "slow");
74                         return false;
75                 };
76                 
77         $(window).scroll(function () { 
78                 
79                 var footer_top = $(document).height() - 30;
80                 $("div#footerbox").css("top", footer_top);
81         
82                 var scrollInfo = $(window).scrollTop();      
83                 
84                 if (scrollInfo <= "900"){
85       $("a#top").attr("id","down");
86       $("a#down").attr("onclick","scrolldown()");
87                 $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png");
88                 $("img#scroll_top_bottom").attr("title","Scroll to bottom");
89                 } 
90                     
91       if (scrollInfo > "900"){
92       $("a#down").attr("id","top");
93       $("a#top").attr("onclick","scrolltop()");
94                 $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png");
95                 $("img#scroll_top_bottom").attr("title","Back to top");
96                 }
97                 
98     });
99   
100
101         function insertFormatting(comment,BBcode,id) {
102         
103                 var tmpStr = $("#comment-edit-text-" + id).val();
104                 if(tmpStr == comment) {
105                         tmpStr = "";
106                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
107                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
108                         openMenu("comment-edit-submit-wrapper-" + id);
109                                                                 }
110
111         textarea = document.getElementById("comment-edit-text-" +id);
112         if (document.selection) {
113                 textarea.focus();
114                 selected = document.selection.createRange();
115                 if (BBcode == "url"){
116                         selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
117                         } else                  
118                 selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
119         } else if (textarea.selectionStart || textarea.selectionStart == "0") {
120                 var start = textarea.selectionStart;
121                 var end = textarea.selectionEnd;
122                 if (BBcode == "url"){
123                         textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
124                         } else
125                 textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
126         }
127         return true;
128         }
129
130         function cmtBbOpen(id) {
131         $(".comment-edit-bb-" + id).show();
132         }
133         function cmtBbClose(id) {
134         $(".comment-edit-bb-" + id).hide();
135         }
136         
137         /*$(document).ready(function(){
138         var doctitle = document.title;
139         function checkNotify() {
140         if(document.getElementById("notify-update").innerHTML != "")
141         document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle;
142         else
143         document.title = doctitle;
144         };
145         setInterval(function () {checkNotify();}, 10 * 1000);
146         })*/
147 </script>
148 <script>
149 var pagetitle = null;
150 $("nav").bind('nav-update',  function(e,data){
151   if (pagetitle==null) pagetitle = document.title;
152   var count = $(data).find('notif').attr('count');
153   if (count>0) {
154     document.title = "("+count+") "+pagetitle;
155   } else {
156     document.title = pagetitle;
157   }
158 });
159 </script>