aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-13 22:17:47 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-13 22:20:54 +0200
commite5d1dd111e7f625ea750efffcd3615ccd2689b5a (patch)
treeecbbec22cffbc81e2baaa1d662bd0bf4bd41640d
parent2c8a82713e828ae79374099c8de90dd584f9f4d1 (diff)
downloadvolse-hubzilla-e5d1dd111e7f625ea750efffcd3615ccd2689b5a.tar.gz
volse-hubzilla-e5d1dd111e7f625ea750efffcd3615ccd2689b5a.tar.bz2
volse-hubzilla-e5d1dd111e7f625ea750efffcd3615ccd2689b5a.zip
fix #480, enable bbcode autocomplete for photo comments and remove some redundant javascript
-rw-r--r--view/js/main.js1
-rw-r--r--view/js/mod_photos.js16
-rwxr-xr-xview/tpl/comment_item.tpl1
-rwxr-xr-xview/tpl/conv_item.tpl1
4 files changed, 3 insertions, 16 deletions
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 @@
<div class="clear"></div>
</form>
</div>
+ <div id="comment-edit-preview-{{$id}}" class="comment-edit-preview"></div>
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 @@
<div class="wall-item-comment-wrapper{{if $item.children}} wall-item-comment-wrapper-wc{{/if}}" >
{{$item.comment}}
</div>
- <div id="comment-edit-preview-{{$item.id}}" class="comment-edit-preview"></div>
<div class="clear"></div>
{{/if}}
</div>