From 47ef689c927f8c8692bb98f190b7cc56d5e088ec Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Jun 2013 16:31:59 -0700 Subject: implement taggable in auto-complete popups --- js/fk.autocomplete.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') 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 = "{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 = $("
"+label+"
"); + var elm = $("
"+label+"
"); elm.click(function(e){ t = $(this).attr('title').replace(new RegExp(' \- .*'),''); if(typeof(that.element.container) === "undefined") { -- cgit v1.2.3 From b86253c655f974920c4d3de0915611a7e66c7336 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 1 Jul 2013 19:41:11 -0700 Subject: issue #65 --- js/main.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js') diff --git a/js/main.js b/js/main.js index f1a50e28a..8b1114d19 100644 --- a/js/main.js +++ b/js/main.js @@ -343,6 +343,8 @@ function updateConvItems(mode,data) { + var expanded_comments = false; + if(mode === 'update') { prev = 'threads-begin'; @@ -353,7 +355,14 @@ function updateConvItems(mode,data) { $('img',this).each(function() { $(this).attr('src',$(this).attr('dst')); }); +// expanded_comments = false; +// $('.collapsed-comments',this).each(function() { +// if($(this).is(':visible')) +// expanded_comments = this; +// }); $('#' + prev).after($(this)); +// if(expanded_comments) +// $(expanded_comments).show(); $(".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 +374,14 @@ function updateConvItems(mode,data) { $('img',this).each(function() { $(this).attr('src',$(this).attr('dst')); }); +// expanded_comments = false; +// $('.collapsed-comments',this).each(function() { +// if($(this).is(':visible')) +// expanded_comments = this; +// }); $('#' + ident).replaceWith($(this)); +// if(expanded_comments) +// $(expanded_comments).show(); $(".autotime").timeago(); // $("div.wall-item-body").divgrow({ initialHeight: 400 }); -- cgit v1.2.3