]> git.mxchange.org Git - friendica.git/commitdiff
add character counter to themes other then frio
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Oct 2021 12:55:21 +0000 (14:55 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Oct 2021 15:03:05 +0000 (17:03 +0200)
Only vier needed some styling so that the counter looked fitting.

closes #2525

view/templates/jot-header.tpl
view/templates/jot.tpl
view/theme/vier/style.css

index 700d12ace10f3a20cfd02d894e69f83fe3cfb7c8..c6656d88666b07939c841abc27d2005f571edc2e 100644 (file)
@@ -24,6 +24,11 @@ function initEditor(callback) {
                $("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") {
index 71939e0eba0f59e250768e27d0ad66e35d96ebb8..693f7bd76617a95ca712c9d50c6b68c15e83493f 100644 (file)
@@ -1,7 +1,6 @@
 <div id="profile-jot-wrapper">
        <div id="profile-jot-banner-wrapper">
                <div id="profile-jot-desc">&nbsp;</div>
-               <div id="character-counter" class="grey"></div>
        </div>
        <div id="profile-jot-banner-end"></div>
 
@@ -18,7 +17,9 @@
                {{if $notes_cid}}
                <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
                {{/if}}
-               <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" dir="auto"></div>
+               <div id="jot-title-wrap">
+                       <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" dir="auto">
+               </div>
                {{if $placeholdercategory}}
                <div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" dir="auto"></div>
                {{/if}}
@@ -29,7 +30,7 @@
 
 <div id="profile-jot-submit-wrapper" class="jothidden">
        <input type="submit" id="profile-jot-submit" name="submit" value="{{$share}}" />
-
+               
        <div id="profile-upload-wrapper" style="display: {{$visitor}};">
                <div id="wall-image-upload-div"><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="{{$upload}}"></a></div>
        </div>
                <a id="profile-nolocation" class="icon noglobe" title="{{$noloc}}" onclick="jotClearLocation();return false;"></a>
        </div>
 
+       <div id="post-length">
+               <span id="character-counter" class="grey"></span>
+       </div>
+
        <div id="profile-jot-perms" class="profile-jot-perms" style="display: {{$pvisit}};">
                <a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon {{$lockstate}}"  title="{{$permset}}"></a>{{$bang}}
        </div>
index 0484a4ea1b03d6e7f19bfd39c5ebae74551ad13a..9054f62f7d2f00e4bcf780d6ec3e4a08e67e366a 100644 (file)
@@ -1778,8 +1778,14 @@ section.minimal {
        padding: 0.3em;
        margin-bottom: 10px;
 }
-
-#profile-jot-form #jot-title, #profile-jot-form #jot-category {
+#post-length {
+       width: 20px;
+       float: left;
+       margin-left: 15px;
+       margin-top: 3px;
+       color: #9c9c9c;
+}
+profile-jot-form #jot-title, #profile-jot-form #jot-category {
        border-radius: 5px 5px 5px 5px;
        font-weight: bold;
        height: 20px;