]> git.mxchange.org Git - friendica.git/commitdiff
Vier: The emoji picker is now integrated
authorMichael <heluecht@pirati.ca>
Sat, 6 May 2023 21:27:21 +0000 (21:27 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 6 May 2023 21:27:21 +0000 (21:27 +0000)
view/templates/head.tpl
view/templates/jot.tpl
view/theme/vier/style.css
view/theme/vier/templates/comment_item.tpl

index a06d51f7c0f0c90061ecb980771b306a78f0d147..ef1596e7b51c560fd93fe221243f9e4b87168db5 100644 (file)
@@ -1,4 +1,3 @@
-
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 <base href="{{$baseurl}}/" />
 <meta name="generator" content="{{$generator}}" />
 <script type="text/javascript" src="view/asset/dompurify/dist/purify.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
 <script type="text/javascript" src="view/js/fancybox/jquery.fancybox.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
 <script type="text/javascript" src="view/js/fancybox/fancybox.config.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
+<script type="text/javascript" src="view/js/vanillaEmojiPicker/vanillaEmojiPicker.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
+<script>
+window.onload = function(){
+       new EmojiPicker({
+               trigger: [
+                       {
+                               selector: '.emojis',
+                               insertInto: ['#comment-edit-text-0', '#profile-jot-text', '.comment-edit-text-full']
+                       }
+               ],
+               closeButton: true
+       });
+};
+</script>
 <script type="text/javascript">
        const updateInterval = {{$update_interval}};
        const localUser = {{if $local_user}}{{$local_user}}{{else}}false{{/if}};
 </script>
 <script type="text/javascript" src="view/js/main.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
-
 <script>
-
        // Lifted from https://css-tricks.com/snippets/jquery/move-cursor-to-end-of-textarea-or-input/
     jQuery.fn.putCursorAtEnd = function() {
         return this.each(function() {
                return false;
        }
 
-
        function commentInsert(obj,id) {
                var tmpStr = $("#comment-edit-text-" + id).val();
                if (tmpStr == "") {
                        $("#comment-edit-form-" + id).show();
                }
        }
-
-
-</script>
-
-
+</script>
\ No newline at end of file
index 6b86186b0a39ea2ac73eb356cc471bc8e26b985b..52d95531d769bd7c93122bdfb8ce822203e23468 100644 (file)
@@ -51,7 +51,9 @@
        <div id="profile-nolocation-wrapper" style="display: none;">
                <a id="profile-nolocation" class="icon noglobe" title="{{$noloc}}" onclick="jotClearLocation();return false;"></a>
        </div>
-
+       <div id="profile-emojis-wrapper" style="display: {{$visitor}};">
+               <a id="profile-emojis" class="icon icon-smile emojis" title="{{$edemojis}}"></a>
+       </div>
        <div id="post-length">
                <span id="character-counter" class="grey"></span>
        </div>
                        {{if $created_at}}{{$created_at nofilter}}{{/if}}
                </div>
        </div>
-
-
 </div>
-
 <div id="profile-jot-end"></div>
 </form>
 </div>
-               {{if $content}}<script>initEditor();</script>{{/if}}
+{{if $content}}<script>initEditor();</script>{{/if}}
\ No newline at end of file
index 2de86c6e328cbb2a26dad94fabce149ee2db5b07..a1713a6043ae2010dfbf6092d012a178daf7a1dd 100644 (file)
@@ -2079,6 +2079,11 @@ profile-jot-form #jot-title, #profile-jot-form #jot-category {
        margin-left: 15px;
        cursor: pointer;
 }
+#profile-emojis-wrapper {
+       float: left;
+       margin-left: 15px;
+       cursor: pointer;
+}
 #jot-perms-icon {
        float: right;
        margin-left: 15px;
index 8caf0d54c33c123340e02a5129b7afc20f9c4bbe..9a539e1f2377e898729b073c9a5f75e021c76223 100644 (file)
@@ -1,4 +1,3 @@
-
                {{if $threaded}}
                <div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-{{$id}}" style="display: block;">
                {{else}}
@@ -37,7 +36,7 @@
                                        <a title="{{$editalic}}" data-role="insert-formatting" data-bbcode="i" data-id="{{$id}}"><i class="icon-italic"></i></a>
                                        <a title="{{$edbold}}" data-role="insert-formatting" data-bbcode="b" data-id="{{$id}}"><i class="icon-bold"></i></a>
                                        <a title="{{$edquote}}" data-role="insert-formatting" data-bbcode="quote" data-id="{{$id}}"><i class="icon-quote-left"></i></a>
-
+                                                                       <a title="{{$edemojis}}" class="emojis"><i class="icon-smile"></i></a>
                                 </div>
                                        <input type="submit" onclick="post_comment({{$id}}); return false;" id="comment-edit-submit-{{$id}}" class="comment-edit-submit" name="submit" value="{{$submit}}" />
                                        {{if $preview}}<input type="submit" onclick="preview_comment({{$id}}); return false;" id="comment-edit-preview-link-{{$id}}" class="comment-edit-submit" value="{{$preview}}" />{{/if}}
@@ -47,5 +46,4 @@
 
                                <div class="comment-edit-end"></div>
                        </form>
-
-               </div>
+               </div>
\ No newline at end of file