diff --git a/boot.php b/boot.php index 92dd051671..a9a062e623 100644 --- a/boot.php +++ b/boot.php @@ -970,7 +970,6 @@ class App { '$local_user' => local_user(), '$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION, '$delitem' => t('Delete this item?'), - '$comment' => t('Comment'), '$showmore' => t('show more'), '$showfewer' => t('show fewer'), '$update_interval' => $interval, diff --git a/js/main.js b/js/main.js index 13bd50bd8f..aaeef00cf7 100644 --- a/js/main.js +++ b/js/main.js @@ -25,11 +25,17 @@ } function openMenu(theID) { - document.getElementById(theID).style.display = "block" + var el = document.getElementById(theID) + if (el) { + el.style.display = "block"; + } } function closeMenu(theID) { - document.getElementById(theID).style.display = "none" + var el = document.getElementById(theID) + if (el) { + el.style.display = "none"; + } } function decodeHtml(html) { @@ -72,21 +78,19 @@ /* setup comment textarea buttons */ /* comment textarea buttons needs some "data-*" attributes to work: * data-role="insert-formatting" : to mark the element as a formatting button - * data-comment="" : string for "Comment", used by insertFormatting() function * data-bbcode="" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]" * data-id="" : id of the comment, used to find other comment-related element, like the textarea * */ $('body').on('click','[data-role="insert-formatting"]', function(e) { e.preventDefault(); var o = $(this); - var comment = o.data('comment'); var bbcode = o.data('bbcode'); var id = o.data('id'); if (bbcode=="img") { Dialog.doImageBrowser("comment", id); return; } - insertFormatting(comment, bbcode, id); + insertFormatting(bbcode, id); }); /* event from comment textarea button popups */ diff --git a/mod/photos.php b/mod/photos.php index af4c60b268..27d8499c28 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1589,7 +1589,6 @@ function photos_content(App $a) { '$id' => $link_item['id'], '$likethis' => t("I like this \x28toggle\x29"), '$nolike' => (feature_enabled(local_user(), 'dislike') ? t("I don't like this \x28toggle\x29") : ''), - '$share' => t('Share'), '$wait' => t('Please wait'), '$return_path' => $a->query_string, )); diff --git a/view/templates/comment_item.tpl b/view/templates/comment_item.tpl index fa360df3a8..63ec5d728b 100644 --- a/view/templates/comment_item.tpl +++ b/view/templates/comment_item.tpl @@ -17,12 +17,12 @@ {{$mytitle}}
- + {{if $qcomment}} {{/if}} diff --git a/view/templates/head.tpl b/view/templates/head.tpl index 036d59ca0d..0772af0bc1 100644 --- a/view/templates/head.tpl +++ b/view/templates/head.tpl @@ -55,14 +55,14 @@ For the relevant js part look at function loadContent() in main.js. *}} {{if $infinite_scroll}} var infinite_scroll = { - 'pageno' : {{$infinite_scroll.pageno}}, - 'reload_uri' : "{{$infinite_scroll.reload_uri}}" - } + "pageno" : {{$infinite_scroll.pageno}}, + "reload_uri" : "{{$infinite_scroll.reload_uri}}" + } {{/if}} function confirmDelete() { return confirm("{{$delitem}}"); } function commentExpand(id) { - $("#comment-edit-text-" + id).value = ''; + $("#comment-edit-text-" + id).value = ""; $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#comment-edit-text-" + id).focus(); @@ -71,8 +71,7 @@ return true; } function commentOpen(obj,id) { - if(obj.value == '{{$comment}}') { - obj.value = ''; + if (obj.value == "") { $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).show(); @@ -82,8 +81,7 @@ return false; } function commentClose(obj,id) { - if(obj.value == '') { - obj.value = '{{$comment}}'; + if (obj.value == "") { $("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).hide(); @@ -96,46 +94,43 @@ function commentInsert(obj,id) { var tmpStr = $("#comment-edit-text-" + id).val(); - if(tmpStr == '{{$comment}}') { - tmpStr = ''; + if (tmpStr == "") { $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); openMenu("comment-edit-submit-wrapper-" + id); } var ins = $(obj).html(); - ins = ins.replace('<','<'); - ins = ins.replace('>','>'); - ins = ins.replace('&','&'); - ins = ins.replace('"','"'); + ins = ins.replace("<","<"); + ins = ins.replace(">",">"); + ins = ins.replace("&","&"); + ins = ins.replace(""","\""); $("#comment-edit-text-" + id).val(tmpStr + ins); } function qCommentInsert(obj,id) { var tmpStr = $("#comment-edit-text-" + id).val(); - if(tmpStr == '{{$comment}}') { - tmpStr = ''; + if (tmpStr == "") { $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); openMenu("comment-edit-submit-wrapper-" + id); } var ins = $(obj).val(); - ins = ins.replace('<','<'); - ins = ins.replace('>','>'); - ins = ins.replace('&','&'); - ins = ins.replace('"','"'); + ins = ins.replace("<","<"); + ins = ins.replace(">",">"); + ins = ins.replace("&","&"); + ins = ins.replace(""","\""); $("#comment-edit-text-" + id).val(tmpStr + ins); - $(obj).val(''); + $(obj).val(""); } window.showMore = "{{$showmore}}"; window.showFewer = "{{$showfewer}}"; function showHideCommentBox(id) { - if( $('#comment-edit-form-' + id).is(':visible')) { - $('#comment-edit-form-' + id).hide(); - } - else { - $('#comment-edit-form-' + id).show(); + if ($("#comment-edit-form-" + id).is(":visible")) { + $("#comment-edit-form-" + id).hide(); + } else { + $("#comment-edit-form-" + id).show(); } } diff --git a/view/templates/jot.tpl b/view/templates/jot.tpl index dfc6b27104..e4692a8bba 100644 --- a/view/templates/jot.tpl +++ b/view/templates/jot.tpl @@ -25,7 +25,7 @@ {{/if}}
- +
@@ -33,26 +33,26 @@
-
+
-
+ +
-
+
-
+
-
+ +
{{$bang}} @@ -70,8 +70,8 @@
-
- +
+
diff --git a/view/templates/moderated_comment.tpl b/view/templates/moderated_comment.tpl index 6e5eb22e7b..1fc4df37ff 100644 --- a/view/templates/moderated_comment.tpl +++ b/view/templates/moderated_comment.tpl @@ -8,7 +8,7 @@ -
+
{{$mytitle|escape:'html'}}
@@ -20,10 +20,10 @@
{{$lbl_modurl}}
- +
-