From 1b90e851f9e53924923d7110591caf50085236c2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 13 Aug 2016 22:17:47 +0200 Subject: fix #480, enable bbcode autocomplete for photo comments and remove some redundant javascript --- view/js/main.js | 1 + view/js/mod_photos.js | 16 +--------------- view/tpl/comment_item.tpl | 1 + view/tpl/conv_item.tpl | 1 - 4 files changed, 3 insertions(+), 16 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 21157bdfe..6fa4bf78a 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -635,6 +635,7 @@ function updateConvItems(mode,data) { $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); /* autocomplete bbcode */ $(".comment-edit-form textarea").bbco_autocomplete('bbcode'); + console.log('bla'); var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; })); var bimgcount = bimgs.length; diff --git a/view/js/mod_photos.js b/view/js/mod_photos.js index e3df3ca68..cbc1d8fa1 100644 --- a/view/js/mod_photos.js +++ b/view/js/mod_photos.js @@ -7,21 +7,7 @@ $(document).ready(function() { $("#photo-edit-newtag").val('@' + data.name); }); - $('#id_body').bbco_autocomplete('bbcode'); - - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { - var selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { - selstr = $(this).text(); - $('#jot-perms-icon').removeClass('fa-unlock').addClass('fa-lock'); - $('#jot-public').hide(); - }); - if(selstr === null) { - $('#jot-perms-icon').removeClass('fa-lock').addClass('fa-unlock'); - $('#jot-public').show(); - } - }).trigger('change'); - + $('textarea').bbco_autocomplete('bbcode'); showHideBodyTextarea(); }); diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 74917d089..5920efafa 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -71,3 +71,4 @@
+
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 903a23eed..add80885b 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -225,7 +225,6 @@
{{$item.comment}}
-
{{/if}} -- cgit v1.2.3