From f0763c4eaf7629da1ce3b8a55c77d54d865ac7fd Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Oct 2021 14:55:21 +0200 Subject: [PATCH 1/3] 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; From 4c04ec483fa0cedd3208e0920a880b13653a6192 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Oct 2021 15:02:51 +0200 Subject: [PATCH 2/3] restore jot.tpl file formatting --- view/templates/jot.tpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/view/templates/jot.tpl b/view/templates/jot.tpl index 693f7bd766..0b057393a7 100644 --- a/view/templates/jot.tpl +++ b/view/templates/jot.tpl @@ -17,9 +17,7 @@ {{if $notes_cid}} {{/if}} -
- -
+
{{if $placeholdercategory}}
{{/if}} From 195d3ecd65218db48fcf64f85df617871fe8d10a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Oct 2021 15:03:45 +0200 Subject: [PATCH 3/3] remove unneeded tabs --- view/templates/jot.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/jot.tpl b/view/templates/jot.tpl index 0b057393a7..2a5df64065 100644 --- a/view/templates/jot.tpl +++ b/view/templates/jot.tpl @@ -28,7 +28,7 @@
- +