]> git.mxchange.org Git - friendica.git/blob - view/smarty3/msg-header.tpl
2cfc7a6a95995630bfc865ca310ab35b3a999e47
[friendica.git] / view / smarty3 / msg-header.tpl
1 {{*
2  *      AUTOMATICALLY GENERATED TEMPLATE
3  *      DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
4  *
5  *}}
6 <script language="javascript" type="text/javascript" src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
7 <script language="javascript" type="text/javascript">
8
9 var plaintext = '{{$editselect}}';
10
11 if(plaintext != 'none') {
12         tinyMCE.init({
13                 theme : "advanced",
14                 mode : "specific_textareas",
15                 editor_selector: /(profile-jot-text|prvmail-text)/,
16                 plugins : "bbcode,paste",
17                 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
18                 theme_advanced_buttons2 : "",
19                 theme_advanced_buttons3 : "",
20                 theme_advanced_toolbar_location : "top",
21                 theme_advanced_toolbar_align : "center",
22                 theme_advanced_blockformats : "blockquote,code",
23                 gecko_spellcheck : true,
24                 paste_text_sticky : true,
25                 entity_encoding : "raw",
26                 add_unload_trigger : false,
27                 remove_linebreaks : false,
28                 force_p_newlines : false,
29                 force_br_newlines : true,
30                 forced_root_block : '',
31                 convert_urls: false,
32                 content_css: "{{$baseurl}}/view/custom_tinymce.css",
33                      //Character count
34                 theme_advanced_path : false,
35                 setup : function(ed) {
36                         ed.onInit.add(function(ed) {
37                                 ed.pasteAsPlainText = true;
38                                 var editorId = ed.editorId;
39                                 var textarea = $('#'+editorId);
40                                 if (typeof(textarea.attr('tabindex')) != "undefined") {
41                                         $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
42                                         textarea.attr('tabindex', null);
43                                 }
44                         });
45                 }
46         });
47 }
48 else
49         $("#prvmail-text").contact_autocomplete(baseurl+"/acl");
50
51
52 </script>
53 <script type="text/javascript" src="js/ajaxupload.js" ></script>
54 <script>
55         $(document).ready(function() {
56                 var uploader = new window.AjaxUpload(
57                         'prvmail-upload',
58                         { action: 'wall_upload/{{$nickname}}',
59                                 name: 'userfile',
60                                 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
61                                 onComplete: function(file,response) {
62                                         tinyMCE.execCommand('mceInsertRawHTML',false,response);
63                                         $('#profile-rotator').hide();
64                                 }                                
65                         }
66                 );
67
68         });
69
70         function jotGetLink() {
71                 reply = prompt("{{$linkurl}}");
72                 if(reply && reply.length) {
73                         $('#profile-rotator').show();
74                         $.get('parse_url?url=' + reply, function(data) {
75                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
76                                 $('#profile-rotator').hide();
77                         });
78                 }
79         }
80
81         function linkdropper(event) {
82                 var linkFound = event.dataTransfer.types.contains("text/uri-list");
83                 if(linkFound)
84                         event.preventDefault();
85         }
86
87         function linkdrop(event) {
88                 var reply = event.dataTransfer.getData("text/uri-list");
89                 event.target.textContent = reply;
90                 event.preventDefault();
91                 if(reply && reply.length) {
92                         $('#profile-rotator').show();
93                         $.get('parse_url?url=' + reply, function(data) {
94                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
95                                 $('#profile-rotator').hide();
96                         });
97                 }
98         }
99
100 </script>
101