From d57f4a9527896b472f5bf6dc429a1edeff0d0aef Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 8 Mar 2021 19:12:37 +0000 Subject: fix unexpected trigger of buttons when pressing enter in input field issue #1528 --- view/tpl/jot-header.tpl | 12 ++++++------ view/tpl/jot.tpl | 44 ++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2539c1fdf..dde623783 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -51,7 +51,7 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { - + $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); @@ -125,8 +125,8 @@ var activeCommentText = ''; }); - function jotSetMime() { - var mtype = $('#id_mimetype').val(); + function jotSetMime() { + var mtype = $('#id_mimetype').val(); if(mtype == 'text/bbcode') $('#profile-jot-submit-left').show(); else @@ -155,7 +155,7 @@ var activeCommentText = ''; textarea = document.getElementById('profile-jot-text'); if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; - var end = textarea.selectionEnd; + var end = textarea.selectionEnd; if (end > start) { reply = prompt("{{$linkurl}}"); if(reply && reply.length) { @@ -351,7 +351,7 @@ var activeCommentText = ''; return false; }); }); - + } function itemFilerRm(id, term) { @@ -593,7 +593,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del localStorage.removeItem("post_body" + postid); localStorage.removeItem("post_category" + postid); } - } + } } diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 1454f038b..53d4f094d 100644 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -52,15 +52,15 @@
{{if $is_owner}} - + {{/if}} {{if $reset}} - {{/if}}
- +
{{if $attachment}}
@@ -99,19 +99,19 @@
{{if $bbcode}}
- - - - -
@@ -119,29 +119,29 @@ {{if $visitor}}
{{if $writefiles}} - {{/if}} {{if $weblink}} - {{/if}} {{if $embedPhotos}} - {{/if}}
{{if $setloc}} - {{/if}} {{if $clearloc}} - {{/if}} @@ -149,17 +149,17 @@
{{/if}} {{if $feature_expire}} - {{/if}} {{if $feature_future}} - {{/if}} {{if $feature_encrypt}} - {{/if}} @@ -167,7 +167,7 @@ {{if $feature_nocomment}} - {{/if}} @@ -224,26 +224,26 @@
{{foreach $customsubmitright as $csr}} - {{/foreach}} {{if $preview}} - {{/if}} {{if $jotnets}} - {{/if}} {{if $showacl}} - {{/if}} - +
{{if $jotplugins}} -- cgit v1.2.3 From b09cbb72fbd64dd1555ce76d431c2dab6c323691 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 8 Mar 2021 19:14:14 +0000 Subject: type submit should not be type button --- view/tpl/jot.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 53d4f094d..23b18ffac 100644 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -243,7 +243,7 @@ {{/if}} - +
{{if $jotplugins}} -- cgit v1.2.3 From 8d26961639eedf76fce06e81c81ebc8fa9b29ae2 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 8 Mar 2021 19:25:01 +0000 Subject: fix summary not saved in browser autosave draft --- view/tpl/jot-header.tpl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index dde623783..2ec581e05 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -570,6 +570,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del if(action != 'clean') { localStorage.setItem("post_title" + postid, $("#jot-title").val()); + localStorage.setItem("post_summary" + postid, $("#jot-summary").val()); localStorage.setItem("post_body" + postid, $("#profile-jot-text").val()); if($("#jot-category").length) localStorage.setItem("post_category" + postid, $("#jot-category").val()); @@ -590,6 +591,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del clearTimeout(postSaveTimer); postSaveTimer = null; localStorage.removeItem("post_title" + postid); + localStorage.removeItem("post_summary" + postid); localStorage.removeItem("post_body" + postid); localStorage.removeItem("post_category" + postid); } @@ -605,6 +607,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del var doctype = $('#jot-webpage').val(); var postid = '-' + doctype + '-' + $('#jot-postid').val(); var postTitle = localStorage.getItem("post_title" + postid); + var postSummary = localStorage.getItem("post_summary" + postid); var postBody = localStorage.getItem("post_body" + postid); var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category" + postid) : ''); var openEditor = false; @@ -613,6 +616,10 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del $('#jot-title').val(postTitle); openEditor = true; } + if(postSummary) { + $('#jot-summary').val(postSummary); + openEditor = true; + } if(postBody) { $('#profile-jot-text').val(postBody); openEditor = true; -- cgit v1.2.3 From 0932d2a0a62ff606b2934e75fd9be240bdc6dc2c Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 8 Mar 2021 19:40:32 +0000 Subject: fix summary not reset on cancel --- view/tpl/jot-header.tpl | 1 + 1 file changed, 1 insertion(+) (limited to 'view/tpl') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2ec581e05..b24283664 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -313,6 +313,7 @@ var activeCommentText = ''; function itemCancel() { $("#jot-title").val(''); + $("#jot-summary").val(''); $("#profile-jot-text").val(''); $(".jot-poll-option input").val(''); $("#jot-category").tagsinput('removeAll'); -- cgit v1.2.3 From 51fe5ec9828d059fe6b11d4ddf28e3e98e81cbf8 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 11 Mar 2021 19:33:03 +0000 Subject: add interactive flag --- view/tpl/xchan_vcard.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index 447839167..fbfb7f0ca 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -14,7 +14,7 @@
{{if $connect}} -- cgit v1.2.3 From 1582b8bc9620a661823c608c0c7023a70554214b Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 12 Mar 2021 09:54:01 +0000 Subject: truncate too long text --- view/tpl/xchan_vcard.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index fbfb7f0ca..7deae0f99 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -5,12 +5,12 @@ {{$name}}
-
+
- {{$name}} + {{$name}}
- {{$addr}} + {{$addr}}
{{if $connect}}
-- cgit v1.2.3