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