]> git.mxchange.org Git - friendica.git/blobdiff - view/templates/jot-header.tpl
Create new Post/Share module class
[friendica.git] / view / templates / jot-header.tpl
index f37b67085ec229055ebc0733d529b75b061012e9..a67f9c3f0c35ef0bdea97a1f6061c5c3cf4b3210 100644 (file)
@@ -8,7 +8,7 @@ var textlen = 0;
 function initEditor(callback) {
        if (editor == false) {
                var  colorbox_options = {
-                       {{if $APP->is_mobile}}
+                       {{if $is_mobile}}
                        'width' : '100%',
                        'height' : '100%',
                        {{/if}}
@@ -19,11 +19,16 @@ function initEditor(callback) {
                $("#profile-jot-text-loading").show();
                $("#profile-jot-text-loading").hide();
                $("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
-               $("#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(colorbox_options);
                $(".jothidden").show();
 
+               $("#profile-jot-text").keyup(function(){
+                       var textlen = $(this).val().length;
+                       $('#character-counter').text(textlen);
+               });
+
                editor = true;
        }
        if (typeof callback != "undefined") {
@@ -40,9 +45,9 @@ function enableOnUser(){
 }
 
 </script>
-<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js></script>
+<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
 <script>
-       var ispublic = '{{$ispublic}}';
+       var ispublic = '{{$ispublic nofilter}}';
 
 
        $(document).ready(function() {
@@ -103,7 +108,7 @@ function enableOnUser(){
                if(reply && reply.length) {
                        reply = bin2hex(reply);
                        $('#profile-rotator').show();
-                       $.get('parse_url?binurl=' + reply, function(data) {
+                       $.get('parseurl?binurl=' + reply, function(data) {
                                addeditortext(data);
                                $('#profile-rotator').hide();
                        });
@@ -136,7 +141,7 @@ function enableOnUser(){
                if ($('#jot-popup').length != 0) $('#jot-popup').show();
 
                $('#like-rotator-' + id).show();
-               $.get('share/' + id, function(data) {
+               $.get('post/' + id + '/share', function(data) {
                        if (!editor) $("#profile-jot-text").val("");
                        initEditor(function(){
                                addeditortext(data);
@@ -160,7 +165,7 @@ function enableOnUser(){
                if(reply && reply.length) {
                        reply = bin2hex(reply);
                        $('#profile-rotator').show();
-                       $.get('parse_url?binurl=' + reply, function(data) {
+                       $.get('parseurl?binurl=' + reply, function(data) {
                                if (!editor) $("#profile-jot-text").val("");
                                initEditor(function(){
                                        addeditortext(data);
@@ -179,7 +184,7 @@ function enableOnUser(){
                                commentBusy = true;
                                $('body').css('cursor', 'wait');
 
-                               $.get('tagger/' + id + '?term=' + reply);
+                               $.post('post/' + id + '/tag/add', {term: reply});
                                if(timer) clearTimeout(timer);
                                timer = setTimeout(NavUpdate,3000);
                                liking = 1;
@@ -210,6 +215,7 @@ function enableOnUser(){
 //                                     if(timer) clearTimeout(timer);
 //                                     timer = setTimeout(NavUpdate,3000);
                                        liking = 1;
+                                       force_update = true;
                                        $.colorbox.close();
                                } else {
                                        $("#id_term").css("border-color","#FF0000");
@@ -230,7 +236,7 @@ function enableOnUser(){
                $("#profile-jot-text").val(currentText + data);
        }
 
-       {{$geotag}}
+       {{$geotag nofilter}}
 
 </script>