]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/jot-header.tpl
Merge remote-tracking branch 'upstream/develop' into aria
[friendica.git] / view / theme / frio / templates / jot-header.tpl
index 73c7690f6e6e5595290d4f86ceda09c682efa810..9f226cda4997bba86e2e5334738e60bf463f2fb8 100644 (file)
@@ -1,5 +1,7 @@
 
-<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js" ></script>
+<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/view/js/linkPreview.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/view/theme/frio/js/jot.js"></script>
 
 <script type="text/javascript">
        var editor = false;
@@ -13,7 +15,7 @@
                        $("#jot-category").show();
                        $("#jot-category").addClass("jot-category-ex");
                        $("#jot-profile-jot-wrapper").show();
-                       $("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
+                       $("#profile-jot-text").editor_autocomplete(baseurl + '/search/acl');
                        $("#profile-jot-text").bbco_autocomplete('bbcode');
                        $("a#jot-perms-icon").colorbox({
                                'inline' : true,
@@ -38,7 +40,8 @@
 </script>
 
 <script type="text/javascript">
-       var ispublic = '{{$ispublic}}';
+       var ispublic = '{{$ispublic nofilter}}';
+       aStr.linkurl = '{{$linkurl}}';
 
 
        $(document).ready(function() {
                }
        }
 
-       function jotGetLink() {
-               var currentText = $("#profile-jot-text").val();
-               var noAttachment = '';
-               reply = prompt("{{$linkurl}}");
-               if(reply && reply.length) {
-                       reply = bin2hex(reply);
-                       $('#profile-rotator').show();
-                       if (currentText.includes("[attachment") && currentText.includes("[/attachment]")) {
-                               noAttachment = '&noAttachment=1';
-                       }
-                       $.get('parse_url?binurl=' + reply + noAttachment, function(data) {
-                               addeditortext(data);
-                               $('#profile-rotator').hide();
-                       });
-                       autosize.update($("#profile-jot-text"));
-               }
-       }
-
        function jotVideoURL() {
                reply = prompt("{{$vidurl}}");
                if(reply && reply.length) {
                }
        }
 
-
        function jotGetLocation() {
                reply = prompt("{{$whereareu}}", $('#jot-location').val());
                if(reply && reply.length) {
        }
 
        function itemFiler(id) {
-
                var bordercolor = $("input").css("border-color");
 
                $.get('filer/', function(data){
                autosize.update($("#profile-jot-text"));
        }
 
-       {{$geotag}}
+       {{$geotag nofilter}}
 
        function jotShow() {
                var modal = $('#jot-modal').modal();
                        .find('#jot-modal-content')
                        .append(jotcache)
                        .modal.show;
+
+               // Jot attachment live preview.
+               linkPreview = $('#profile-jot-text').linkPreview();
        }
 
        // Activate the jot text section in the jot modal