]> git.mxchange.org Git - friendica.git/blob - view/smarty3/wallmsg-header.tpl
Implement Smarty3
[friendica.git] / view / smarty3 / wallmsg-header.tpl
1
2 <script language="javascript" type="text/javascript" src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3 <script language="javascript" type="text/javascript">
4
5 var plaintext = '{{$editselect}}';
6
7 if(plaintext != 'none') {
8         tinyMCE.init({
9                 theme : "advanced",
10                 mode : "specific_textareas",
11                 editor_selector: /(profile-jot-text|prvmail-text)/,
12                 plugins : "bbcode,paste",
13                 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
14                 theme_advanced_buttons2 : "",
15                 theme_advanced_buttons3 : "",
16                 theme_advanced_toolbar_location : "top",
17                 theme_advanced_toolbar_align : "center",
18                 theme_advanced_blockformats : "blockquote,code",
19                 gecko_spellcheck : true,
20                 paste_text_sticky : true,
21                 entity_encoding : "raw",
22                 add_unload_trigger : false,
23                 remove_linebreaks : false,
24                 force_p_newlines : false,
25                 force_br_newlines : true,
26                 forced_root_block : '',
27                 convert_urls: false,
28                 content_css: "{{$baseurl}}/view/custom_tinymce.css",
29                      //Character count
30                 theme_advanced_path : false,
31                 setup : function(ed) {
32                         ed.onInit.add(function(ed) {
33                                 ed.pasteAsPlainText = true;
34                                 var editorId = ed.editorId;
35                                 var textarea = $('#'+editorId);
36                                 if (typeof(textarea.attr('tabindex')) != "undefined") {
37                                         $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
38                                         textarea.attr('tabindex', null);
39                                 }
40                         });
41                 }
42         });
43 }
44 else
45         $("#prvmail-text").contact_autocomplete(baseurl+"/acl");
46
47
48 </script>
49 <script>
50
51         function jotGetLink() {
52                 reply = prompt("{{$linkurl}}");
53                 if(reply && reply.length) {
54                         $('#profile-rotator').show();
55                         $.get('parse_url?url=' + reply, function(data) {
56                                 tinyMCE.execCommand('mceInsertRawHTML',false,data);
57                                 $('#profile-rotator').hide();
58                         });
59                 }
60         }
61
62         function linkdropper(event) {
63                 var linkFound = event.dataTransfer.types.contains("text/uri-list");
64                 if(linkFound)
65                         event.preventDefault();
66         }
67
68         function linkdrop(event) {
69                 var reply = event.dataTransfer.getData("text/uri-list");
70                 event.target.textContent = reply;
71                 event.preventDefault();
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 </script>
82