]> git.mxchange.org Git - friendica.git/blobdiff - view/jot-header.tpl
allow tag input to contain leading '#'
[friendica.git] / view / jot-header.tpl
index 8174026abbdf4071e769e82862dac8140b72fad1..ecf27e1b179647b0643371c88d4726f6799b6536 100644 (file)
@@ -142,20 +142,13 @@ function initEditor(cb){
                if(reply && reply.length) {
                        reply = bin2hex(reply);
                        $('#profile-rotator').show();
-                       $.get('parse_url?url=' + reply, function(data) {
+                       $.get('parse_url?binurl=' + reply, function(data) {
                                tinyMCE.execCommand('mceInsertRawHTML',false,data);
                                $('#profile-rotator').hide();
                        });
                }
        }
 
-       function jotGetVideo() {
-               reply = prompt("$utubeurl");
-               if(reply && reply.length) {
-                       tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
-               }
-       }
-
        function jotVideoURL() {
                reply = prompt("$vidurl");
                if(reply && reply.length) {
@@ -221,6 +214,19 @@ function initEditor(cb){
                }
        }
 
+       function itemTag(id) {
+               $('#like-rotator-' + id).show();
+               reply = prompt("$term");
+               if(reply && reply.length) {
+                       reply = reply.replace('#','');
+                       if(reply.length) {
+                               $.get('tagger/' + id + '?term=' + reply, function(data) {
+                                       $('#like-rotator-' + id).hide();
+                               });
+                       }
+               }
+       }
+
        function jotClearLocation() {
                $('#jot-coord').val('');
                $('#profile-nolocation-wrapper').hide();