From daa8e4f9013d3ad329d3deadf8c823bae57bc171 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 8 Jan 2017 01:49:13 +1100 Subject: [PATCH 1/7] Cleaning up, actual changes are in the next commits - Formatting - Trailing spaces - Extraneous blank lines - Large comments --- mod/photos.php | 3 +- view/templates/comment_item.tpl | 2 +- view/templates/head.tpl | 35 +- view/templates/jot.tpl | 18 +- view/templates/moderated_comment.tpl | 4 +- .../duepuntozero/templates/comment_item.tpl | 11 +- .../templates/moderated_comment.tpl | 6 +- view/theme/duepuntozero/theme.php | 59 ++- view/theme/frio/js/filebrowser.js | 23 +- view/theme/frio/js/textedit.js | 4 +- view/theme/frio/templates/comment_item.tpl | 6 +- view/theme/frio/templates/jot.tpl | 4 +- view/theme/frost-mobile/js/theme.js | 379 +++--------------- .../frost-mobile/templates/comment_item.tpl | 45 +-- view/theme/frost-mobile/templates/head.tpl | 4 +- view/theme/frost-mobile/templates/jot.tpl | 14 +- .../templates/moderated_comment.tpl | 6 +- view/theme/frost/js/theme.js | 338 +++++----------- view/theme/frost/templates/comment_item.tpl | 29 +- view/theme/frost/templates/head.tpl | 4 +- view/theme/frost/templates/jot.tpl | 18 +- .../frost/templates/moderated_comment.tpl | 6 +- view/theme/quattro/templates/comment_item.tpl | 8 +- view/theme/smoothly/templates/bottom.tpl | 7 +- view/theme/smoothly/templates/jot.tpl | 16 +- view/theme/smoothly/theme.php | 52 +-- view/theme/vier/templates/comment_item.tpl | 8 +- view/theme/vier/theme.php | 34 +- 28 files changed, 315 insertions(+), 828 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index e026944423..3b927ed84f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1307,7 +1307,7 @@ function photos_content(&$a) { } - /** + /** * Display one photo */ @@ -1583,7 +1583,6 @@ function photos_content(&$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..a0fd805bcc 100644 --- a/view/templates/comment_item.tpl +++ b/view/templates/comment_item.tpl @@ -22,7 +22,7 @@ {{/if}} diff --git a/view/templates/head.tpl b/view/templates/head.tpl index 0f1ec837f8..0f22362620 100644 --- a/view/templates/head.tpl +++ b/view/templates/head.tpl @@ -56,14 +56,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(); @@ -104,10 +104,10 @@ 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); } @@ -120,23 +120,22 @@ 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..a3600c3ff5 100644 --- a/view/templates/jot.tpl +++ b/view/templates/jot.tpl @@ -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..a8f1c6b1eb 100644 --- a/view/templates/moderated_comment.tpl +++ b/view/templates/moderated_comment.tpl @@ -8,7 +8,7 @@ -
+
{{$mytitle|escape:'html'}}
@@ -23,7 +23,7 @@
-