]> git.mxchange.org Git - friendica.git/blob - view/jot-header.tpl
78e0151d80696c68294b14e93198966fc204e973
[friendica.git] / view / jot-header.tpl
1 <script language="javascript" type="text/javascript"
2           src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3           <script language="javascript" type="text/javascript">
4
5 tinyMCE.init({
6         theme : "advanced",
7         mode : "specific_textareas",
8         editor_selector: "profile-jot-text",
9         plugins : "bbcode",
10         theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
11         theme_advanced_buttons2 : "",
12         theme_advanced_buttons3 : "",
13         theme_advanced_toolbar_location : "top",
14         theme_advanced_toolbar_align : "center",
15         theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle",
16         content_css : "bbcode.css",
17         entity_encoding : "raw",
18         add_unload_trigger : false,
19         remove_linebreaks : false,
20         content_css: "$baseurl/view/custom_tinymce.css"
21 });
22
23 </script>
24 <script type="text/javascript" src="include/ajaxupload.js" ></script>
25 <script>
26         $(document).ready(function() {
27                 var uploader = new window.AjaxUpload(
28                         'wall-image-upload',
29                         { action: 'wall_upload',
30                                 name: 'userfile',
31                                 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
32                                 onComplete: function(file,response) {
33                                         tinyMCE.execCommand('mceInsertRawHTML',false,response);
34                                         $('#profile-rotator').hide();
35                                 }                                
36                         }
37                 );
38
39         });
40
41
42         function jotGetLink() {
43                 reply = prompt("Please enter a link URL:");
44                 if(reply && reply.length) {
45                         $('#profile-rotator').show();
46                         $.get('parse_url?url=' + reply, function(data) {
47                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
48                                 $('#profile-rotator').hide();
49                         });
50                 }
51         }
52
53         var src = null;
54
55         $(document).ready(function() {
56                 if($('#live-network').length) { src = 'network';  setTimeout(liveUpdate, 30000); }
57                 if($('#live-profile').length) { src = 'profile';  setTimeout(liveUpdate, 30000); }
58         });
59
60         function liveUpdate() {
61                 if(src == null) { return; }
62                 if($('.comment-edit-text-full').length) {
63                         setTimeout(liveUpdate, 30000);
64                         return;
65                 }
66
67 //              $.get('update_' + src,function(data)
68 //                      {
69 //                      $(data).find('#wall-item-outside-wrapper').each(function() {
70 //                              var net = $(this).find('net').text();
71 //                              if(net == 0) { net = ''; }
72 //                              $('#net-update').html(net);
73 //                              var home = $(this).find('home').text();
74 //                              if(home == 0) { home = ''; }
75 //                              $('#home-update').html(home);
76 //                              var mail = $(this).find('mail').text();
77 //                              if(mail == 0) { mail = ''; }
78 //                              $('#mail-update').html(mail);
79 //                              var intro = $(this).find('intro').text();
80 //                              if(intro == 0) { intro = ''; }
81 //                              $('#notify-update').html(intro);
82 //                      });
83 //              }) ;
84
85                 setTimeout(liveUpdate,30000);
86         }
87                         
88
89
90
91 </script>
92
93 <!--
94
95         relative_urls: false,
96         document_base_url : "$baseurl/",
97          external_image_list_url : "$baseurl/include/imagelist-js.php",
98          content_css : "$baseurl/view/tiny.css"
99
100 });
101 </script>
102 -->