From f0763c4eaf7629da1ce3b8a55c77d54d865ac7fd Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Oct 2021 14:55:21 +0200 Subject: [PATCH] add character counter to themes other then frio Only vier needed some styling so that the counter looked fitting. closes #2525 --- view/templates/jot-header.tpl | 5 +++++ view/templates/jot.tpl | 11 ++++++++--- view/theme/vier/style.css | 10 ++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/view/templates/jot-header.tpl b/view/templates/jot-header.tpl index 700d12ace1..c6656d8866 100644 --- a/view/templates/jot-header.tpl +++ b/view/templates/jot-header.tpl @@ -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") { diff --git a/view/templates/jot.tpl b/view/templates/jot.tpl index 71939e0eba..693f7bd766 100644 --- a/view/templates/jot.tpl +++ b/view/templates/jot.tpl @@ -1,7 +1,6 @@
 
-
@@ -18,7 +17,9 @@ {{if $notes_cid}} {{/if}} -
+
+ +
{{if $placeholdercategory}}
{{/if}} @@ -29,7 +30,7 @@
- +
@@ -53,6 +54,10 @@
+
+ +
+
{{$bang}}
diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 0484a4ea1b..9054f62f7d 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -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;