aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/acl.js4
-rw-r--r--js/fk.autocomplete.js6
-rw-r--r--js/main.js17
3 files changed, 22 insertions, 5 deletions
diff --git a/js/acl.js b/js/acl.js
index 629a55447..591c9c467 100644
--- a/js/acl.js
+++ b/js/acl.js
@@ -247,8 +247,8 @@ ACL.prototype.populate = function(data){
var height = Math.ceil(data.tot / that.nw) * 42;
that.list_content.height(height);
$(data.items).each(function(){
- html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
- html = html.format( this.photo, this.name, this.type, this.xid, '', this.network, this.link );
+ html = "<div class='acl-list-item {4} {5} {7}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
+ html = html.format( this.photo, this.name, this.type, this.xid, '', this.network, this.link, this.taggable );
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
//console.log(html);
that.list_content.append(html);
diff --git a/js/fk.autocomplete.js b/js/fk.autocomplete.js
index fc41f9cbe..cd0a1c044 100644
--- a/js/fk.autocomplete.js
+++ b/js/fk.autocomplete.js
@@ -80,7 +80,7 @@ ACPopup.prototype._search = function(){
that.cont.show();
$(data.items).each(function(){
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
- that.add(html, this.nick.replace(' ','') + '+' + this.id + ' - ' + this.link);
+ that.add(this.taggable, html, this.nick.replace(' ','') + '+' + this.id + ' - ' + this.link);
});
} else {
that.cont.hide();
@@ -89,9 +89,9 @@ ACPopup.prototype._search = function(){
});
}
- ACPopup.prototype.add = function(label, value){
+ACPopup.prototype.add = function(taggable, label, value){
var that=this;
- var elm = $("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
+ var elm = $("<div class='acpopupitem " + taggable +"' title='"+value+"'>"+label+"</div>");
elm.click(function(e){
t = $(this).attr('title').replace(new RegExp(' \- .*'),'');
if(typeof(that.element.container) === "undefined") {
diff --git a/js/main.js b/js/main.js
index 4938c6acd..2d1e9ab76 100644
--- a/js/main.js
+++ b/js/main.js
@@ -346,14 +346,26 @@ function updateConvItems(mode,data) {
if(mode === 'update') {
prev = 'threads-begin';
+
$('.thread-wrapper.toplevel_item',data).each(function() {
+
var ident = $(this).attr('id');
+ var commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
+ var itmId = 0;
+ var isVisible = false;
+ if(typeof commentWrap !== 'undefined')
+ itmId = commentWrap.replace('collapsed-comments-','');
+
if($('#' + ident).length == 0 && profile_page == 1) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
+ if($('#collapsed-comments-'+itmId).is(':visible'))
+ isVisible = true;
$('#' + prev).after($(this));
+ if(isVisible)
+ showHideComments(itmId);
$(".autotime").timeago();
// divgrow doesn't prevent itself from attaching a second (or 500th)
// "show more" div to a content region - it also has a few other
@@ -365,7 +377,12 @@ function updateConvItems(mode,data) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
+ // more FIXME related to expanded comments
+ if($('#collapsed-comments-'+itmId).is(':visible'))
+ isVisible = true;
$('#' + ident).replaceWith($(this));
+ if(isVisible)
+ showHideComments(itmId);
$(".autotime").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });